package com.daoeping.data;

import java.sql.Timestamp;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Bzn_questioncomm entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "bzn_questioncomm", catalog = "daoeping")
public class Bzn_questioncomm implements java.io.Serializable {

	// Fields

	private Integer id;
	private Usr_user usr_user;
	private Bzn_question bzn_question;
	private String content;
	private Integer rank;
	private Timestamp createDatetime;

	// Constructors

	/** default constructor */
	public Bzn_questioncomm() {
	}

	/** minimal constructor */
	public Bzn_questioncomm(Usr_user usr_user, Bzn_question bzn_question) {
		this.usr_user = usr_user;
		this.bzn_question = bzn_question;
	}

	/** full constructor */
	public Bzn_questioncomm(Usr_user usr_user, Bzn_question bzn_question,
			String content, Integer rank,Timestamp createDatetime) {
		this.usr_user = usr_user;
		this.bzn_question = bzn_question;
		this.content = content;
		this.rank = rank;
		this.createDatetime = createDatetime;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "user_id", nullable = false)
	public Usr_user getUsr_user() {
		return this.usr_user;
	}

	public void setUsr_user(Usr_user usr_user) {
		this.usr_user = usr_user;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "question_id", nullable = false)
	public Bzn_question getBzn_question() {
		return this.bzn_question;
	}

	public void setBzn_question(Bzn_question bzn_question) {
		this.bzn_question = bzn_question;
	}

	@Column(name = "content", length = 500)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "rank")
	public Integer getRank() {
		return this.rank;
	}

	public void setRank(Integer rank) {
		this.rank = rank;
	}


	@Column(name = "create_datetime", length = 19)
	public Timestamp getCreateDatetime() {
		return createDatetime;
	}

	public void setCreateDatetime(Timestamp createDatetime) {
		this.createDatetime = createDatetime;
	}


}